package com.alibaba.controller;

import com.alibaba.annotation.SystemLog;
import com.alibaba.common.ResponseResult;
import com.alibaba.define.domain.vo.LinkVO;
import com.alibaba.define.service.LinkService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author : hanyang
 * @date : 2023-11-02 23:23
 **/

@Slf4j
@RestController
@RequestMapping("/link")
public class LinkController {

    @Resource
    LinkService linkService;


    @GetMapping("/getAllLink")
    @SystemLog(businessName = "查询所有友链")
    public ResponseResult<List<LinkVO>> getAllLink() {
        log.info("query getAllLink ...");
        return linkService.getAllLink();
    }
}
